<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="de" xml:lang="de" xmlns="http://www.w3.org/1999/xhtml">
<head>
  <link rel="replies" type="application/atom+xml" title="Comment Feed" href="comments/" />
  <link rel="self" href="https://blog.mro.name/2023/04/thinkpad-x250-freebsd-xfce/" />
  <link rel="sitemap" type="application/xml" title="Sitemap" href="../../../sitemap.xml" />
  <link rel="stylesheet" href="../../../assets/prism.css" />
  <link rel="stylesheet" href="../../../assets/style.css" />
  <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
  <meta name="author" content="Marcus Rohrmoser" />
  <meta name="date" content="2023-04-17T17:47:52+02:00" />
  <meta name="DC.Subject" scheme="../../../categories/" content="en" />
  <meta name="DC.Subject" scheme="../../../categories/" content="sysadmin" />
  <meta name="generator" content="HTML Tidy for HTML5 for FreeBSD version 5.8.0" />
  <meta name="keywords" content="Thinkpad X250 FreeBSD Xfce zfs" />
  <meta name="title" content="Thinkpad X250 with FreeBSD (Xfce 🐀)" />
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <script src="../../../assets/script.js"></script>
  <title>Thinkpad X250 with FreeBSD (Xfce 🐀) | MRo Blog</title>
</head>
<body>
  <nav>
    <ul class="menu">
      <li><a rel="up" href="../../../.">MRo Blog</a></li>
      <li><a href="../../../categories/">Categories</a></li>
      <li><a href="../../../tags/"># Tags</a></li>
    </ul>
    <form action="/search">
      <input name="q" type="text" placeholder="🔍 Search" /> <button submit=
      "submit">Search!</button>
    </form>
    <hr />
  </nav>
  <div class="article-meta">
    <!-- should this be populated from the head? -->
    <h1 class="title">Thinkpad X250 with FreeBSD (Xfce 🐀)</h1>
    <p class="date">Mon, 17. Apr 2023</p>
    <p class="terms">Categories: <a href="../../../categories/en">en</a> <a href=
    "../../../categories/sysadmin">sysadmin</a> Tags: <a href="../../../tags/thinkpad">Thinkpad</a>
    <a href="../../../tags/x250">X250</a> <a href="../../../tags/freebsd">FreeBSD</a> <a href=
    "../../../tags/xfce">Xfce</a> <a href="../../../tags/zfs">zfs</a></p>
  </div>
  <div id="main">
    <p>tl;dr <a href=
    "https://codeberg.org/mro/x250-freebsd">https://codeberg.org/mro/x250-freebsd</a></p>
    <p>Recently a refurbished <a href="https://thinkwiki.de/X250">Thinkpad X250</a> from <a href=
    "https://GreenPanda.de">GreenPanda.de</a> (EUR 160,-) arrived. I plan to use it as my main
    machine for</p>
    <ul>
      <li>programming (🐫 ocaml)</li>
      <li>writing (txt, html, css)</li>
      <li>reading (documentation, forums etc.)</li>
      <li>graphics editing (gimp &amp; inkscape)</li>
      <li>email, irc, messaging</li>
      <li>video meetings</li>
      <li>minetest :-)</li>
    </ul>
    <h2 id="the-wishlist">The wishlist</h2>
    <p>[x] network, Wifi<br />
    [x] ocaml, helix, gitui, nnn, fortune, cowsay, fish<br />
    [x] tidy, xmllint, xsltproc, raptor2, tinycdb, awk, dash<br />
    [x] lynx, ssh, mosh, openssl<br />
    [x] firefox, vlc, espeak-ng, minetest, mumble<br />
    [x] 😀 emojis<br />
    [ ] display brightness &amp; keys<br />
    [ ] microphone<br />
    [ ] webcam, chromium<br />
    [ ] audio volume &amp; keys<br />
    [ ] lid close sleep/resume<br />
    [ ] finger scanner unlock</p>
    <h2 id="let-s-go">Let’s go</h2>
    <p>At first I got the <a href=
    "https://download.freebsd.org/ftp/releases/ISO-IMAGES/13.2/FreeBSD-13.2-RELEASE-amd64-memstick.img.xz">
    FreeBSD 13.2 USB image</a>, flashed a thumbdrive and installed it wiping the preinstalled
    useless Microsoft and Norton software.</p>
    <p>On installation I chose the Wifi region <code>APAC2 / DE</code> without bothering much about
    it.</p>
    <p>Then came</p>
    <pre><code class="language-sh-session">$ cat /etc/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
eapol_version=2
ap_scan=1
fast_reauth=1

network={
  # example closed network
  ssid="&lt;redacted&gt;"
  psk="&lt;redacted&gt;"
  priority=3
}
network={
  # example open network
  ssid="&lt;redacted&gt;"
  scan_ssid=0
  key_mgmt=NONE
  priority=1
}
# more networks
# ...
$ service netif restart
</code></pre>
    <p>Next</p>
    <pre><code class="language-sh-session">$ freebsd-update fetch
$ freebsd-update install
$ make -C /usr/ports/graphics/drm-510-kmod install
</code></pre>
    <pre><code class=
    "language-sh-session">$ pkg install doas portmaster rsync curl fish dash tinycdb mosh nnn ncdu git gitui lynx helix stow tree htop fzf
$ cat /usr/local/etc/doas.conf
permit nopass keepenv :wheel
permit nopass keepenv root as root
$ pkg install mixertui espeak-ng
$ pkg install graphviz mscgen tidy-html5 raptor2 fusefs-sshfs fusefs-curlftpfs
$ ssh-keygen -t ed25519
$ hx /usr/local/etc/doas.conf
</code></pre>
    <pre><code class="language-sh-session">$ pkg install gmake gcc ocaml-opam
$ opam init ; opam switch create 4.10.2
</code></pre>
    <pre><code class="language-sh-session">$ pkg install xorg-minimal xfce lightdm-gtk-greeter
$ sysrc dbus_enable="YES"
$ sysrc lightdm_enable="YES"
</code></pre>
    <pre><code class=
    "language-sh-session">$ pkg install figlet cowsay fortune-mod-freebsd-classic-g20171128
$ pkg-install dillo firefox minetest_game vlc mumble
$ pkg install twemoji-color-font-ttf-14.0.2 noto-emoji-2.034
</code></pre>
    <p>Hints for hardware compatibility and 101 were in</p>
    <p><a href=
    "https://unixcop.com/how-to-install-xfce-in-freebsd-13/#comment-18913">https://unixcop.com/how-to-install-xfce-in-freebsd-13/#comment-18913</a>,
    <a href=
    "https://forums.freebsd.org/threads/resume-from-suspend-on-thinkpad-x250.84517/">https://forums.freebsd.org/threads/resume-from-suspend-on-thinkpad-x250.84517/</a>
    <a href=
    "https://forums.freebsd.org/threads/boot-to-mountroot-anyway-to-rescue-it.73244/#post-446760">https://forums.freebsd.org/threads/boot-to-mountroot-anyway-to-rescue-it.73244/#post-446760</a></p>
    <p>And <em>always</em> leave the <code>zfs_load="YES"</code> in <code>/boot/loader.conf</code>
    if you chose zfs on installation.</p>
    <h2 id="rescue-boot">Rescue boot</h2>
    <ul>
      <li>on boot press <code>F12</code> and choose the thumbdrive to boot from in the BIOS
      menu</li>
      <li>
        <p>boot into a shell or live system</p>
        <pre><code class=
        "language-sh-session"># https://forums.freebsd.org/threads/boot-to-mountroot-anyway-to-rescue-it.73244/#post-446760
$ mkdir /tmp/root
$ zpool import -fR /tmp/root zroot
$ zfs mount zroot/ROOT/default
$ ...
$ zpool export zroot
$ shutdown -p now
</code></pre>
      </li>
    </ul>
  </div><iframe id="comments" src="comments/" onload="setIframeHeight(this.id)"></iframe>
  <div id="footer">
    <hr />
    © <a rel="me" href="../../../about/">Marcus Rohrmoser</a> | <a href="../../../about/">About</a>
    | <a rel="privacy-policy terms-of-service" href="../../../impressum-datenschutz/">§ Impressum
    &amp; Datenschutz</a><br />
    <a href="https://mro.name/microblog">Microblog</a> | <a href="https://mro.name/paste">Paste</a>
    | <a href="https://mro.name/qr">QR</a> | <a href="https://mro.name/radio">Radio</a> | <a href=
    "https://mro.name/wetter">Wetter</a> | <a href=
    "https://hebdo.framapad.org/p/blog-mro-name-pinwand-9pl1?lang=de">Pinnwand</a> | <a href=
    "https://mro.name/code/blog.mro.name">Code</a> | <a rel="alternate" type="application/atom+xml"
    href="../../../index.xml">Feed</a><br />
    <a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/de/legalcode">CC BY-SA
    4.0</a> 
    <script src="../../../assets/prism.js"></script>
  </div>
</body>
</html>
